#include <iostream>
#include "crossroad.hpp"

using namespace jam;

int main(int argc, const char *argv[]) {
  std::string literals;
  if (argc == 2) {
    literals = argv[1]; // 不就是一次内存拷贝么...
  } else {
    std::cin >> literals;
  }
  Directions directions(literals);
  crossroad.add_cars(directions);
  crossroad.schedule();
  return 0;
}